#include "fxcc/imgui/Editor.h"
#include "fxcc/core/graph/common/Type.h"
#include "fxcc/core/graph/common/AttachmentType.h"

using namespace fxcc::graph::common;
using namespace fxcc::imgui;

template <>
bool Editor::Edit<fxcc::graph::common::ModeType>(const std::string& label, fxcc::graph::common::ModeType& inst)
{
    static std::map<fxcc::graph::common::ModeType, std::string> l1 =
    {

                {ModeType::_mode_Triangles_,"_mode_Triangles_"},
                {ModeType::_mode_Triangle_stripe_,"_mode_Triangle_stripe_"},
                {ModeType::_mode_Lines_,"_mode_Lines_"},
                {ModeType::_mode_Line_Stripe,"_mode_Line_Stripe"},
                {ModeType::_mode_points_,"_mode_points_"},
    };
    return this->ComboEnumMap< fxcc::graph::common::ModeType>(label.c_str(), inst, l1);

};


template <>
bool Editor::Edit<fxcc::graph::common::VertexType>(const std::string& label, fxcc::graph::common::VertexType& inst)
{
    static std::map<fxcc::graph::common::VertexType, std::string> l1 =
    {
                {fxcc::graph::common::VertexType::_vertex_fixed_,"_vertex_fixed_"},
                {fxcc::graph::common::VertexType::_vertex_skinned_,"_vertex_skinned_"},
    };
    return this->ComboEnumMap< fxcc::graph::common::VertexType>(label.c_str(), inst, l1);

};



template <>
bool Editor::Edit<fxcc::graph::common::IndexType>(const std::string& label, fxcc::graph::common::IndexType& inst)
{
    static std::map<fxcc::graph::common::IndexType, std::string> l1 =
    {
                {fxcc::graph::common::IndexType::_index_unsigned_byte_,"_index_unsigned_byte_"},
                {fxcc::graph::common::IndexType::_index_unsigned_short_,"_index_unsigned_short_"},
                {fxcc::graph::common::IndexType::_index_unsigned_int_,"_index_unsigned_int_"}
    };
    return this->ComboEnumMap< fxcc::graph::common::IndexType>(label.c_str(), inst, l1);

};


template <>
bool Editor::Edit<fxcc::graph::common::AttachmentType>(const std::string& label, fxcc::graph::common::AttachmentType& inst)
{
    static std::map<fxcc::graph::common::AttachmentType, std::string> l1 =
    {
                {fxcc::graph::common::AttachmentType::_Depth24_Stencil8_,"Depth24_Stencil8"},
                {fxcc::graph::common::AttachmentType::_Depth_,"Depth"},
    };
    return this->ComboEnumMap< fxcc::graph::common::AttachmentType>(label.c_str(), inst, l1);

};


